package com.cicoding.enums;

import jdk.nashorn.internal.objects.annotations.Getter;

/**
 * @Author:chandfy
 * @Description:
 * @Date:2022/7/21
 */
public enum BizCodeEnum {
    /**
     * 验证码
     */
    CODE_TO_ERROR(240001, "接收号码不合规"),
    CODE_LIMITED(240002, "验证码发送过快"),
    CODE_ERROR(240003, "验证码错误"),
    CODE_CAPTCHA_ERROR(240101, "图形验证码错误"),
    /**
     * 账号
     */
    ACCOUNT_REPEAT(250001, "账号已经存在"),
    ACCOUNT_UNREGISTER(250002, "账号不存在"),
    ACCOUNT_PWD_ERROR(250003, "账号或者密码错误"),
    ACCOUNT_UNLOGIN(250004, "账号未登录"),
    ID_NUMBER_ERROR(250005, "身份证号不合法"),
    ACCOUNT_PWD_ILLEGAL(250006, "密码不合法"),


    /**
     * 题目生成
     */
    GENERATE_PROBLEM_FAIL_BY_ZERO(300001, "生成题目数量不能为0"),
    GENERATE_PROBLEM_SUCCESS(300002,"生成题目完成"),


    /**
     * 通⽤操作码
     */
    OPS_REPEAT(110001, "重复操作"),
    OPS_NETWORK_ADDRESS_ERROR(110002, "⽹络地址错误"),
    /**
     * ⽂件相关
     */
    FILE_UPLOAD_USER_IMG_FAIL(700101, "⽤户头像⽂件上传失败"),
    FILE_TYPE_USER_IMG_ERROR(700102, "⽤户头像⽂件类型不支持"),

    /**
     * 数据库相关
     */
    DB_ROUTE_NOT_FOUND(800001,"数据库找不到"),
    MQ_CONSUME_EXCEPTION(900001,"消费者异常"),

    DATA_OUT_OF_LIMIT_SIZE(400001,"查询条数超过限制");

    private String message;

    public String getMessage() {
        return message;
    }

    public int getCode() {
        return code;
    }

    private int code;

    private BizCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
